﻿using Purdue.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace Purdue.Models
{
    [Table(Name="Trandes")]
    public class Trade : NotificationObject
    {
        public Trade() { }

        public Trade(string title)
        {
            Title = title;
        }

        #region Fields
        private Int64 id;
        private string title;
        #endregion

        #region Properties
        /// <summary>
        /// 编号
        /// </summary>
        [Column(Name = "Id", IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "BIGINT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public Int64 Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

        /// <summary>
        /// 名称
        /// </summary>
        [Column]
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged(() => Title);
            }
        }
        #endregion
    }
}
